<template>
<onekit-page>
<onekit-view onekit-class="container">
	<div is="onekit-template-head" :DATA="`${JSON.stringify({title:'form'})}`"></div>
	<onekit-view onekit-class="page-body">
		<onekit-form @Submit.stop="formSubmit" @Reset.stop="formReset">
			<onekit-view onekit-class="page-section page-section-gap">
				<onekit-view onekit-class="page-section-title">switch</onekit-view>
				<onekit-switch name="switch"></onekit-switch>
			</onekit-view>
			<onekit-view onekit-class="page-section page-section-gap">
				<onekit-view onekit-class="page-section-title">radio</onekit-view>
				<onekit-radio-group name="radio">
					<onekit-label>
						<onekit-radio value="radio1"></onekit-radio>
选项一
					</onekit-label>
					<onekit-label>
						<onekit-radio value="radio2"></onekit-radio>
选项二
					</onekit-label>
				</onekit-radio-group>
			</onekit-view>
			<onekit-view onekit-class="page-section page-section-gap">
				<onekit-view onekit-class="page-section-title">checkbox</onekit-view>
				<onekit-checkbox-group name="checkbox">
					<onekit-label>
						<onekit-checkbox value="checkbox1"></onekit-checkbox>
选项一
					</onekit-label>
					<onekit-label>
						<onekit-checkbox value="checkbox2"></onekit-checkbox>
选项二
					</onekit-label>
				</onekit-checkbox-group>
			</onekit-view>
			<onekit-view onekit-class="page-section page-section-gap">
				<onekit-view onekit-class="page-section-title">slider</onekit-view>
				<onekit-slider value="50" name="slider" show-value></onekit-slider>
			</onekit-view>
			<onekit-view onekit-class="page-section">
				<onekit-view onekit-class="page-section-title">input</onekit-view>
				<onekit-view onekit-class="weui-cells weui-cells_after-title">
					<onekit-view onekit-class="weui-cell weui-cell_input">
						<onekit-view onekit-class="weui-cell__bd">
							<onekit-input onekit-class="weui-input" name="input" placeholder="这是一个输入框"></onekit-input>
						</onekit-view>
					</onekit-view>
				</onekit-view>
			</onekit-view>
			<onekit-view onekit-class="btn-area">
				<onekit-button type="primary" formType="submit">Submit</onekit-button>
				<onekit-button formType="reset">Reset</onekit-button>
			</onekit-view>
		</onekit-form>
	</onekit-view>
	<div is="onekit-template-foot"></div>
</onekit-view>
</onekit-page></template>
<script>
/* eslint-disable */
import Vue from 'vue';
import onekit_template_0 from '../../../../page/common/head.head.vue';Vue.component('onekit-template-head',onekit_template_0);
import onekit_template_1 from '../../../../page/common/foot.foot.vue';Vue.component('onekit-template-foot',onekit_template_1);
const ONEKIT_JSON= {
  "navigationBarTitleText": "form",
  "usingComponents": {
    
  }
};
const ONEKIT_SJS = {
};
import wx from '../../../../../weixin2vue/wx.js';
import Macro from '../../../../../weixin2vue/Macro.js';
const {getApp,getCurrentPages} = Macro;
import Page from '../../../../../weixin2vue/OnekitPage.js';
import Component from '../../../../../weixin2vue/OnekitComponent.js';
export default Page(ONEKIT_JSON,[],ONEKIT_SJS,{
    "onShareAppMessage"(){
      return {
        "title":'form',
        "path":'page/component/pages/form/form'
};
    },
    "data":{
        "pickerHidden":true,
        "chosen":''
},
    "pickerConfirm"(e){
      this.setData({
        "pickerHidden":true
});
      this.setData({
        "chosen":e.detail.value
});
    },
    "pickerCancel"(){
      this.setData({
        "pickerHidden":true
});
    },
    "pickerShow"(){
      this.setData({
        "pickerHidden":false
});
    },
    "formSubmit"(e){
      console.log('form发生了submit事件，携带数据为：',e.detail.value);
    },
    "formReset"(e){
      console.log('form发生了reset事件，携带数据为：',e.detail.value);
      this.setData({
        "chosen":''
});
    }
});

</script>
<style 
 lang="css">
@import '/page/common/lib/weui.css';
.onekit-label {
  display: inline-block ;
  min-width: 235px ;
  margin-right: 10px ;
}
.onekit-form {
  width: 100% ;
}
.picker-text {
  margin-left: 10px ;
  position: relative ;
}
</style>